<template>
  <div>Demo1页面</div>
  <div>
    {{ props.title }}
  </div>
</template>

<script setup lang="ts">
import { onMounted, ref } from "vue";

const props = defineProps({
  title: {
    type: String,
    default: "空",
  },
});
const emit = defineEmits(["add"]);
onMounted(() => {
  emit("add", "子组件的数据");
});
const erzi = ref("儿子");
defineExpose({ erzi });
</script>

<style scoped></style>
